package com.tjetc.mapper;

import com.tjetc.domain.HDepartment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface HDepartmentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(HDepartment record);

    int insertSelective(HDepartment record);

    HDepartment selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(HDepartment record);

    int updateByPrimaryKey(HDepartment record);

    @Select("select * from h_department where hid = #{id} and ispoint = 1")
    List<HDepartment> selectPointByHid(Integer id);

    @Select("select * from h_department where hid = #{id} ")
    List<HDepartment> selectByHid(Integer id);

    @Delete("delete from h_department where hid = #{id} ")
    int deleteByHid(Integer id);

    List<HDepartment> selAll(String name);

    Integer delById(Integer id);

    Integer add(HDepartment hDepartment);

    List<HDepartment> findAll();

    List<HDepartment> selectByHidWithClinics(Integer id);

    List<HDepartment> selByHidAndName(@Param("name") String name,@Param("hid") Integer hid);
}